package string;

//trim()方法,去除字符串两边空白符
//返回一个新String
public class TrimDemo {
    public static void main(String[] args) {
        String str = "   hello   ";
        System.out.println(str.trim());
        System.out.println(str.trim().length());//5
        System.out.println(str.length());//11

    }
}
